package com.example.pc.mytestapplication.activity;

import android.content.Intent;
import android.databinding.DataBindingUtil;
import android.view.View;

import com.example.pc.mytestapplication.R;
import com.example.pc.mytestapplication.databinding.ActivityMenuBinding;

/**
 * Created by lxg on 2018/2/1.
 */

public class menuActivity extends BaseActivity {

    private ActivityMenuBinding activityMenuBinding;

    @Override
    protected void loadView() {
        activityMenuBinding = DataBindingUtil.setContentView(this, R.layout.activity_menu);
    }

    @Override
    protected void setinitView() {
        activityMenuBinding.btBianhuan.setOnClickListener(this);
        activityMenuBinding.btChuangjian.setOnClickListener(this);
        activityMenuBinding.btZuhe.setOnClickListener(this);
    }

    @Override
    protected void loadData() {

    }

    @Override
    public void onClick(View view) {
        Intent i = new Intent();
        switch (view.getId()) {
            case R.id.bt_chuangjian:
                i.setClass(menuActivity.this, MainActivity.class);
                break;
            case R.id.bt_bianhuan:
                i.setClass(menuActivity.this, ConversionActivity.class);
                break;
            case R.id.bt_zuhe:
                i.setClass(menuActivity.this, GroupActivity.class);
                break;
        }
        startActivity(i);
    }
}
